<?php
    
    namespace App\Module\Api\Validator;
    use App\System\Base\Validator\BaseValidator;

    /**
     * 定义验证器类
     * @author liujun
     */
    class UserRegisterValidator extends BaseValidator
    {
        protected $rules = [
            'q.type' => 'required|integer:between:1,3',
            'q.number' => 'required|integer:between:1,6',
            'q.referrerId' => 'required|integer',
            'q.mobile' => 'required|regex:/^1[0-9]{10}$/',
        ];
        
        protected $messages = [

        ];

        protected $attributes = [
            'q.type'=>'市场类型',
            'q.number' => '报单数量',
            'q.referrerId' => '推荐人ID',
            'q.mobile' => '手机号'
        ];
    }